import java.util.Date;

public class StateMachine {

    public static void main(String[] args) {
        StateMachine machine = new StateMachine();
        machine.run();
    }

    public void run() {
        Date currentTime = new Date();
        int hour = currentTime.getHours();
        int waterTemperature;
        boolean hasWater;
        if (hour == 7) {
            System.out.println("准备烧水");
            // 模拟检测水温及水的状态
            waterTemperature = 15;
            hasWater = true;
            if (waterTemperature < 20 && hasWater) {
                System.out.println("水温达到要求且有水，开始烧水");
            } else {
                System.out.println("不满足烧水条件");
            }
        } else if (hour == 23) {
            System.out.println("休眠状态");
        } else {
            System.out.println("非特定时间状态");
        }
    }
}